package com.nengchuan.eic.nceconomy.entity.vo;

import com.nengchuan.eic.nceconomy.entity.po.IndexDict;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * 功能描述:
 *
 * @Author: liurui
 * @Date: 2020/5/14 0014 上午 10:00
 */
@Data
public class IndexListVO {

    private List<Index> powerTransformation;

    private List<Index> circuit;

    @Data
    @AllArgsConstructor
    public static class Index{
        @ApiModelProperty(value = "sheet名")
        private String sheetName;
        @ApiModelProperty(value = "序号")
        private String serialNum;
        @ApiModelProperty(value = "id")
        private Long id;
        @ApiModelProperty(value = "指标名")
        private String name;
        @ApiModelProperty(value = "指标code")
        private String code;
        @ApiModelProperty(value = "指标类型")
        private String type;
        @ApiModelProperty(value = "父id")
        private Long pid;
        @ApiModelProperty(value = "子集合")
        private List<Index> son;

        public Index(IndexDict indexDict){
            this.sheetName=indexDict.getTemplateName();
            this.serialNum=indexDict.getSerialNum();
            this.name=indexDict.getName();
            this.code=indexDict.getCode();
            this.type=indexDict.getType();
            this.id=indexDict.getId();
        }

    }

}
